package com.ali.springcloud.Controller;

import com.ali.springcloud.entities.CommonResult;
import com.ali.springcloud.entities.Payment;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author ：ALi
 * @date ：Created in 2022/7/2 14:43
 * @description：控制类
 * @modified By：
 * @version: $
 */
@RestController
@Slf4j
public class OrderZKController {
    //    public static final String PAYMENT_URL = "http://localhost:8001";
    public static final String INVOKE_URL = "http://cloud-provider-payment";

    @Resource
    private RestTemplate restTemplate;



    @GetMapping("/consumer/payment/zk")
    public String PaymentInfo(){
        log.info("getPayment");
        return restTemplate.getForObject(INVOKE_URL+"/payment/zk",String.class);
    }
}